
 /* Results for Appendix A: Results Using Full Sample of Data
  This .do file will create all results in Appendix A. For each set of results we have four congresses 109-112. We will estimate the working class legislator separately for each Congress and then do a pooled analysis as well. 

*/




 /* Table A1
The code produces the estimates of the relationship between working class status and introduction of social welfare legislation using the full sample of legislators from the 109th to 112th Congresses. 

These analyses use the pink measure of working class and the Clausen measure of Social Welfare legislation

The Intro Clausen variable is coded 1 if a Legislator introduced a bill coded as social welfare legislation in a given congress. 

*/


clear
*cd "/Users/nweller/Dropbox/class_pcs_project/ClassSession_Final/PRQ Revisions/Data"
 
use "LegislatorDataPCS.dta"

*cd "/Users/nweller/Dropbox/class_pcs_project/ClassSession_Final/PRQ Revisions/Data/Appendices/Full Results/"

log using "FullSample_results.log", replace


**Rescale Median Household Income
replace median_hh = median_hh/1000

**109th congress
gen T109Full=member_wc_pink
label variable T109Full "109th Congress"

logit intro_clausen T109Full median_hh share_black party share_latino  dist_pct_union dem_vote_share if cong==109, robust

estimate store cong109socialFull

outreg2 using FullSample_Intro.xls, replace title("Effect of Working-Class Legislator on Bill Introduction") ///
label ctitle("109th Congress Full Estimate")

**110th Congress
gen T110Full=member_wc_pink
label variable T110Full "110th Congress"

logit intro_clausen T110Full median_hh share_black party share_latino  dist_pct_union dem_vote_share if cong==110, robust

estimate store cong110socialFull

outreg2 using FullSample_Intro.xls, append title("Effect of Working-Class Legislator on Bill Introduction") ///
label ctitle("110th Congress Full Estimate")

**111th Congress
gen T111Full=member_wc_pink
label variable T111Full "111th Congress"

logit intro_clausen T111Full median_hh share_black party share_latino  dist_pct_union dem_vote_share if cong==111, robust

estimate store cong111socialFull

outreg2 using FullSample_Intro.xls, append title("Effect of Working-Class Legislator on Bill Introduction") ///
label ctitle("112th Congress Full Estimate")

**112th Congress
gen T112Full=member_wc_pink
label variable T112Full "112th Congress"

logit intro_clausen T112Full median_hh share_black party share_latino  dist_pct_union dem_vote_share if cong==112, robust

estimate store cong112socialFull

outreg2 using FullSample_Intro.xls, append title("Effect of Working-Class Legislator on Bill Introduction") ///
label ctitle("112th Congress Full Estimate")

**All Congresses
gen TALLFull=member_wc_pink
label variable TALLFull "All Congresses"

logit intro_clausen TALLFull median_hh share_black party share_latino  dist_pct_union dem_vote_share i.cong, robust

estimate store congALLsocialFull

outreg2 using FullSample_Intro.xls, append title("Effect of Working-Class Legislator on Bill Introduction") ///
label ctitle("All Congress Full Estimate")

	
coefplot ///
    (cong109socialFull,  label("109") msymbol(O) mcolor(black) lcolor(black)) ///
    (cong110socialFull, label("110") msymbol(O) mcolor(black) lcolor(black)) ///
    (cong111socialFull, label("111") msymbol(O) mcolor(black) lcolor(black)) ///
    (cong112socialFull, label("112") msymbol(O) mcolor(black) lcolor(black)) ///
    (congALLsocialFull, label("All") msymbol(O) mcolor(black) lcolor(black)), ///
    keep (T109Full T110Full T111Full T112Full TallFull) ///
    scheme(s1mono) ///
    xline(0) ///
    level(90) ///
    legend(off) ///
	offset (0) ///
	 ciopts(recast(rcap) lcolor(black)) ///
    xtitle(DV: Probability of Bill Introductions)
	

graph save "FullResults_Intro.gph", replace
	

clear

**Results for Table A2

clear
cd "/Users/nweller/Dropbox/class_pcs_project/ClassSession_Final/PRQ Revisions/Data"
 
use "LegislatorDataPCS.dta"

cd "/Users/nweller/Dropbox/class_pcs_project/ClassSession_Final/PRQ Revisions/Data/Appendices/Full Results/"


**109th Congresses
table member_wc_pink if cong==109

gen T109 =member_wc_pink 
label variable T109 "109th Congress"

reg sum_clausen_soc_welfare T109 median_hh share_black party share_latino dist_pct_union dem_vote_share if cong==109, robust

estimate store cong109socialFull

outreg2 using SumIntroFull.xls, replace title("Effect of Working-Class Legislator on Number Bill Introductions") ///
label ctitle("109th Congress Social Welfare")


*110th Congresses
table member_wc_pink if cong==110

gen T110 =member_wc_pink 
label variable T110 "110th Congress"

reg sum_clausen_soc_welfare T110 median_hh share_black party share_latino dist_pct_union dem_vote_share if cong==110, robust

estimate store cong110socialFull

outreg2 using SumIntroFull.xls, append title("Effect of Working-Class Legislator on Number Bill Introductions") ///
label ctitle("110th Congress Social Welfare")

*111th Congresses
table member_wc_pink if cong==111

gen T111 =member_wc_pink 
label variable T111 "111th Congress"

reg sum_clausen_soc_welfare T111 median_hh share_black party share_latino  dist_pct_union  dem_vote_share if cong==111, robust

estimate store cong111socialFull

outreg2 using SumIntroFull.xls, append title("Effect of Working-Class Legislator on Number Bill Introductions") ///
label ctitle("111th Congress Social Welfare")

*112th Congresses
table member_wc_pink if cong==112

gen T112 =member_wc_pink 
label variable T112 "112th Congress"

reg sum_clausen_soc_welfare T112 median_hh share_black party share_latino  dist_pct_union  dem_vote_share if cong==112, robust

estimate store cong112socialFull

outreg2 using SumIntroFull.xls, append title("Effect of Working-Class Legislator on Number Bill Introductions") ///
label ctitle("112th Congress Social Welfare")

**All Congresses 
quietly tabulate cong, generate(new_congress)
table member_wc_pink

gen Tall =member_wc_pink 
label variable Tall "All Congresses"

reg sum_clausen_soc_welfare Tall median_hh share_black party share_latino  dist_pct_union dem_vote_share i.cong , robust

estimate store AllCongSocialFull

outreg2 using SumIntroFull.xls, append title("Effect of Working-Class Legislator on Number Bill Introductions") ///
label ctitle("All Congresses Social Welfare")

	
coefplot ///
    (cong109socialFull,  label("109") msymbol(O) mcolor(black) lcolor(black)) ///
    (cong110socialFull, label("110") msymbol(O) mcolor(black) lcolor(black)) ///
    (cong111socialFull, label("111") msymbol(O) mcolor(black) lcolor(black)) ///
    (cong112socialFull, label("112") msymbol(O) mcolor(black) lcolor(black)) ///
    (AllCongSocialFull, label("All") msymbol(O) mcolor(black) lcolor(black)), ///
    keep (T109 T110 T111 T112 Tall) ///
    scheme(s1mono) ///
    xline(0) ///
    level(90) ///
    legend(off) ///
	offset (0) ///
	 ciopts(recast(rcap) lcolor(black)) ///
    xtitle(DV: Sum of Bill Introductions)
	
	graph save "FullSample_SumIntros.gph", replace

clear

**Results for Table A3

cd "/Users/nweller/Dropbox/class_pcs_project/ClassSession_Final/PRQ Revisions/Data"
 
use "LegislatorDataPCS.dta"

cd "/Users/nweller/Dropbox/class_pcs_project/ClassSession_Final/PRQ Revisions/Data/Appendices/Full Results/"


**109th Congresses
table member_wc_pink if cong==109

gen T109 =member_wc_pink 
label variable T109 "109th Congress"

reg mean_PCS1 T109 median_hh share_black party share_latino  dist_pct_union  dem_vote_share if cong==109 

estimate store cong109social

outreg2 using FullSample_MeanPCS.xls, replace title("Effect of Working-Class Legislator") ///
label ctitle("109th Congress Social Welfare")


*110th Congresses
table member_wc_pink if cong==110

gen T110 =member_wc_pink 
label variable T110 "110th Congress"

reg mean_PCS1 T110 median_hh share_black party share_latino   dist_pct_union dem_vote_share if cong==110, robust

estimate store cong110social

outreg2 using FullSample_MeanPCS.xls, append title("Effect of Working-Class Legislator") ///
label ctitle("110th Congress Social Welfare ")



*111th Congresses
table member_wc_pink if cong==111

gen T111 =member_wc_pink 
label variable T111 "111th Congress"

reg mean_PCS1 T111 median_hh share_black party share_latino  dist_pct_union  dem_vote_share if cong==111, robust

estimate store cong111social

outreg2 using FullSample_MeanPCS.xls, append title("Effect of Working-Class Legislator") ///
label ctitle("111th Congress Social Welfare ")


*112th Congresses
table member_wc_pink if cong==112

gen T112 =member_wc_pink 
label variable T112 "112th Congress"

reg mean_PCS1 T112 median_hh share_black party share_latino  dist_pct_union  dem_vote_share if cong==112, robust

estimate store cong112social

outreg2 using FullSample_MeanPCS.xls, append title("Effect of Working-Class Legislator") ///
label ctitle("112th Congress Social Welfare ")



**All Congresses 
quietly tabulate cong, generate(new_congress)
table member_wc_pink


gen Tall =member_wc_pink 
label variable Tall "All Congresses"

reg mean_PCS1 Tall median_hh share_black party share_latino  dist_pct_union  dem_vote_share i.cong, robust
estimate store AllCongSocial

outreg2 using FullSample_MeanPCS.xls, append title("Effect of Working-Class Legislator") ///
label ctitle("All Congresses Social Welfare ")


**Plot of Working Class Background on Mean PCS Scores, Social Welfare Legislation
	coefplot ///
    (cong109social,  label("109") msymbol(O) mcolor(black) ) ///
    (cong110social, label("110") msymbol(O) mcolor(black) ) ///
    (cong111social, label("111") msymbol(O) mcolor(black)) ///
    (cong112social, label("112") msymbol(O) mcolor(black)) ///
    (AllCongSocial, label("All") msymbol(O) mcolor(black) ), ///
    keep (T109 T110 T111 T112 Tall) ///
    scheme(s1mono) ///
    xline(0) ///
    level(90) ///
    legend(off) ///
	offset (0) ///
	 ciopts(recast(rcap) lcolor(black)) ///
    xtitle(DV: Average PCS Score)

graph save "FullSample_MeanPCS.gph", replace

clear 



* Results for Table A4


clear
cd "/Users/nweller/Dropbox/class_pcs_project/ClassSession_Final/PRQ Revisions/Data"
 
use "LegislatorDataPCS.dta"

cd "/Users/nweller/Dropbox/class_pcs_project/ClassSession_Final/PRQ Revisions/Data/Appendices/Full Results/"
 


**109th Congresses
table member_wc_pink if cong==109

gen T109 =member_wc_pink 
label variable T109 "109th Congress"

reg max_PCS1 T109 median_hh share_black party share_latino dist_pct_union  dem_vote_share if cong==109, robust

estimate store FullSample109social

outreg2 using FullSample_maxPCS.xls, replace title("Effect of Working-Class Legislator") ///
label ctitle("109th Congress Social Welfare")


*110th Congresses
table member_wc_pink if cong==110

gen T110 =member_wc_pink 
label variable T110 "110th Congress"

reg max_PCS1 T110 median_hh share_black  share_latino party dist_pct_union dem_vote_share if cong==110, robust

estimate store FullSample110social

outreg2 using FullSample_maxPCS.xls, append title("Effect of Working-Class Legislator") ///
label ctitle("110th Congress Social Welfare ")





*111th Congresses
table member_wc_pink if cong==111

gen T111 =member_wc_pink 
label variable T111 "111th Congress"

reg max_PCS1 T111 median_hh share_black party share_latino dist_pct_union dem_vote_share if cong==111, robust

estimate store FullSample111social

outreg2 using FullSample_maxPCS.xls, append title("Effect of Working-Class Legislator") ///
label ctitle("111th Congress Social Welfare ")

*112th Congresses
table member_wc_pink if cong==112

gen T112 =member_wc_pink 
label variable T112 "112th Congress"

reg max_PCS1 T112 median_hh share_black party share_latino  dist_pct_union  dem_vote_share if cong==112, robust

estimate store FullSample112social
outreg2 using FullSample_maxPCS.xls, append title("Effect of Working-Class Legislator") ///
label ctitle("112th Congress Social Welfare ")


**All Congresses 
quietly tabulate cong, generate(new_congress)
table member_wc_pink

gen Tall =member_wc_pink 
label variable Tall "All Congresses"

reg max_PCS1 Tall median_hh share_black party share_latino dist_pct_union dem_vote_share i.cong, robust

estimate store FullSampleAllSocial

outreg2 using FullSample_maxPCS.xls, append title("Effect of Working-Class Legislator") ///
label ctitle("All Congress Social Welfare ")


**Plot for Social Welfare Legislation
	
coefplot ///
    (FullSample109social,  label("109") msymbol(O) mcolor(black) lcolor(black)) ///
    (FullSample110social, label("110") msymbol(O) mcolor(black) lcolor(black)) ///
    (FullSample111social, label("111") msymbol(O) mcolor(black) lcolor(black)) ///
    (FullSample112social, label("112") msymbol(O) mcolor(black) lcolor(black)) ///
    (FullSampleAllSocial, label("All") msymbol(O) mcolor(black) lcolor(black)), ///
    keep (T109 T110 T111 T112 Tall) ///
    scheme(s1mono) ///
    xline(0) ///
    level(90) ///
    legend(off) ///
	 ciopts(recast(rcap) lcolor(black)) ///
    xtitle(DV: Maximum PCS Score)
	
graph save "FullSample_MaxPCS.gph", replace

clear






